#ifndef __clib_map_h__
#define __clib_map_h__

#include <inttype.h>
#include <list.h>

#ifdef __cplusplus
extern "C"{
#endif

typedef struct _smap
{
    void *m;
} smap ;

typedef struct _sm_iterator
{
    void *it;
} sm_iterator;

smap* sm_create();
void  sm_destroy( smap *m );
int sm_find( smap *m, const char *key, void **val );
int sm_insert( smap *m, const char *key, void *val );
int sm_delete( smap *m, const char *key );
int sm_for_each( smap *m, void (*func)(void*) );

smap* im_create();
void  im_destroy( smap *m );
int im_find( smap *m, int64 key, void **val );
int im_insert( smap *m, int64 key, void *val );
int im_delete( smap *m, int64 key );
int im_for_each( smap *m, void (*func)(void*) );

smap* mm_create();
void  mm_destroy( smap *m );
int mm_find( smap *m, const char *key, list *val );
int mm_insert( smap *m, const char *key, void *val );
int mm_delete( smap *m, const char *key );
int mm_for_each( smap *m, void (*func)(void*) );

#ifdef __cplusplus
};
#endif

#endif // __clib_map_h__
